﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Donal.Xms.DAL; 
using Donal.Xms.Model; 

namespace Donal.Xms.BLL
{
    public class article_like
    {
        private static readonly Donal.Xms.DAL.article_like _DALarticle_like = new Donal.Xms.DAL.article_like();

        #region 查看是否存在该记录(条件语句优先)
        /// <summary>
        /// 查看是否存在该记录(条件语句优先)
        /// </summary>
        /// <param name="Id">关键字</param>
        /// <param name="strWhere">条件语句</param>
        /// <returns></returns>
        public bool Exists(int Id,string strWhere="")
        {
            return _DALarticle_like.Exists(Id,strWhere);
        } 
        #endregion

        #region 根据关键字获得用户实体对象
        /// <summary>
        /// 根据关键字获得用户实体对象
        /// </summary>
        /// <param name="Id">关键字</param>
        /// <returns>实体记录</returns>
        public Donal.Xms.Model.article_like SelectModel(int Id)
        {
            return _DALarticle_like.SelectModel(Id);
        }
        #endregion

        #region 获取数据集
        /// <summary>
        /// 获取数据集
        /// </summary>
        /// <param name="whereStr">条件语句</param>
        /// <returns>实体泛型集合</returns>
        public IList<Donal.Xms.Model.article_like> SelectList(string whereStr)
        {
            return _DALarticle_like.SelectList(whereStr);
        }
        #endregion

        #region 获得前几行数据
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            return _DALarticle_like.GetList(Top, strWhere, filedOrder);
        }
        #endregion

        #region 获得记录数
        /// <summary>
        /// 获得记录数
        /// </summary>
        public int GetCount(string strWhere)
        {
            return _DALarticle_like.GetCount(strWhere);
        }
        #endregion

        #region 根据分页查询记录
        /// <summary>
        /// 根据分页查询记录
        /// </summary>
        /// <param name="pageSize">页面显示的行数</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageCount">总行数</param>
        /// <returns>根据分页查询到的记录</returns>
        public IList<Donal.Xms.Model.article_like> SelectByPage(int pageSize, int pageIndex, out int pageCount)
        {
            return _DALarticle_like.SelectByPaged(pageSize, pageIndex, out pageCount);
        } 
        #endregion

        #region 根据分页查询记录
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            return _DALarticle_like.GetList(pageSize, pageIndex, strWhere, filedOrder, out recordCount);
        } 
        #endregion


        #region 删除一条记录
        /// <summary>
        /// 删除一条记录
        /// </summary>
        /// <param name="Id">关键字</param>
        /// <returns>删除结果</returns>
        public int Del(int Id)
        {
            return _DALarticle_like.Del(Id);
        }
        #endregion

        #region 删除一条数据
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int id)
        {
            return _DALarticle_like.Delete(id);
        }
        #endregion

        #region 得到一个对象实体
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Donal.Xms.Model.article_like GetModel(int id)
        {
            return _DALarticle_like.GetModel(id);
        }
        #endregion

        #region 添加一条记录
        /// <summary>
        /// 添加一条记录
        /// </summary>
        /// <param name="_entity"></param>
        /// <returns>添加结果</returns>
        public int Add(Donal.Xms.Model.article_like _entity)
        {
            return _DALarticle_like.Add(_entity);
        }
        #endregion

        #region 更新一条记录
        /// <summary>
        /// 更新一条记录
        /// </summary>
        /// <param name="_entity"></param>
        /// <returns>更新结果</returns>
        public int Update(Donal.Xms.Model.article_like  _entity)
        {
            return _DALarticle_like.Update(_entity);
        }
        #endregion
    }
}


